package com.ys.timer;

import com.ys.service.bi.BiFinancialFundsService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Controller;

/**
 * @Author: fxz
 * @CreateTime: 2024-09-02
 * @Description: 财务BI
 * @Version: 1.5
 */
@Controller
public class TimerFinancialBiDaily {
	private static final Logger logger = LoggerFactory.getLogger(TimerFinancialBiDaily.class);

	@Autowired
	private BiFinancialFundsService biFinancialFundsService;

	//每天00:28:00刷BI数据
	@Scheduled(cron = "0 28 0 * * * ")
	public void addReFinanceExamineDaily() {
		try {
			logger.info("***********定时刷财务资金BI数据***********");
			biFinancialFundsService.addByFinancialFunds();
			logger.info("***********定时刷财务资金BI数据***********");
		}catch (Exception e){
			logger.error("定时刷财务资金BI数据表出错：",e.getMessage(),e);
		}
	}



	
}
